package com.ruoyi.redtea.dualprevent.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 分析单元
 * @TableName train_analyse_unit
 */
@TableName("train_analyse_unit")
@Data
public class TrainAnalyseUnit implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 分析单元所属部门
     */
    private Long deptId;

    /**
     * 分析单元名称
     */
    private String aunitName;

    /**
     * 分析单元编码
     */
    private String aunitCode;

    /**
     * 分析单元所属类型
     */
    private Integer type;

    /**
     * 是否重大危险源  Y：是  N：否
     */
    private String isMajorHazard;

    /**
     * 重大危险源风险等级
     */
    private Integer unitHazardLevel;

    /**
     * 重大危险源类型
     */
    private Integer hazardType;

    /**
     * 主要责任人id,多人,分割
     */
    private String majorDutyPerson;

    /**
     * 技术责任人id,多人,分割
     */
    private String skillDutyPerson;

    /**
     * 操作责任人id,多人,分割
     */
    private String operatorDutyPerson;

    /**
     * 头牌负责人id,多人,分割
     */
    private String headDutyPerson;

    /**
     * 是否重要监控 Y：是  N：否
     */
    private String isStressMonitor;

    /**
     * 
     */
    private Date updateTime;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    @TableLogic
    private Integer isdel;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TrainAnalyseUnit other = (TrainAnalyseUnit) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAunitName() == null ? other.getAunitName() == null : this.getAunitName().equals(other.getAunitName()))
            && (this.getAunitCode() == null ? other.getAunitCode() == null : this.getAunitCode().equals(other.getAunitCode()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getIsMajorHazard() == null ? other.getIsMajorHazard() == null : this.getIsMajorHazard().equals(other.getIsMajorHazard()))
            && (this.getUnitHazardLevel() == null ? other.getUnitHazardLevel() == null : this.getUnitHazardLevel().equals(other.getUnitHazardLevel()))
            && (this.getHazardType() == null ? other.getHazardType() == null : this.getHazardType().equals(other.getHazardType()))
            && (this.getMajorDutyPerson() == null ? other.getMajorDutyPerson() == null : this.getMajorDutyPerson().equals(other.getMajorDutyPerson()))
            && (this.getSkillDutyPerson() == null ? other.getSkillDutyPerson() == null : this.getSkillDutyPerson().equals(other.getSkillDutyPerson()))
            && (this.getOperatorDutyPerson() == null ? other.getOperatorDutyPerson() == null : this.getOperatorDutyPerson().equals(other.getOperatorDutyPerson()))
            && (this.getHeadDutyPerson() == null ? other.getHeadDutyPerson() == null : this.getHeadDutyPerson().equals(other.getHeadDutyPerson()))
            && (this.getIsStressMonitor() == null ? other.getIsStressMonitor() == null : this.getIsStressMonitor().equals(other.getIsStressMonitor()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getIsdel() == null ? other.getIsdel() == null : this.getIsdel().equals(other.getIsdel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAunitName() == null) ? 0 : getAunitName().hashCode());
        result = prime * result + ((getAunitCode() == null) ? 0 : getAunitCode().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getIsMajorHazard() == null) ? 0 : getIsMajorHazard().hashCode());
        result = prime * result + ((getUnitHazardLevel() == null) ? 0 : getUnitHazardLevel().hashCode());
        result = prime * result + ((getHazardType() == null) ? 0 : getHazardType().hashCode());
        result = prime * result + ((getMajorDutyPerson() == null) ? 0 : getMajorDutyPerson().hashCode());
        result = prime * result + ((getSkillDutyPerson() == null) ? 0 : getSkillDutyPerson().hashCode());
        result = prime * result + ((getOperatorDutyPerson() == null) ? 0 : getOperatorDutyPerson().hashCode());
        result = prime * result + ((getHeadDutyPerson() == null) ? 0 : getHeadDutyPerson().hashCode());
        result = prime * result + ((getIsStressMonitor() == null) ? 0 : getIsStressMonitor().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getIsdel() == null) ? 0 : getIsdel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", aunitName=").append(aunitName);
        sb.append(", aunitCode=").append(aunitCode);
        sb.append(", type=").append(type);
        sb.append(", isMajorHazard=").append(isMajorHazard);
        sb.append(", unitHazardLevel=").append(unitHazardLevel);
        sb.append(", hazardType=").append(hazardType);
        sb.append(", majorDutyPerson=").append(majorDutyPerson);
        sb.append(", skillDutyPerson=").append(skillDutyPerson);
        sb.append(", operatorDutyPerson=").append(operatorDutyPerson);
        sb.append(", headDutyPerson=").append(headDutyPerson);
        sb.append(", isStressMonitor=").append(isStressMonitor);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", isdel=").append(isdel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}